<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='项目奖补-添加',jsPaths='/static/js/baseinfo/grants/add.js')">
<div class="right" th:fragment="right">
    <!--面包屑-->
    <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                    <a th:href="@{/}">首页</a>
                    <a href="">奖补捐赠</a>
                    <a href="/grants">项目奖补</a>
                    <a><cite>编辑</cite></a>
                </span>
    </div>

    <!--主体内容区-->
    <div class="form-content layui-container">
        <form class="layui-form" th:action="@{/grants/update}" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">类型</label>
                <div class="layui-input-block">
                    <select name="type" lay-verify="required">
                        <option value="1" th:selected="${grants.type eq 1}">奖补</option>
                        <option value="2" th:selected="${grants.type eq 2}">捐赠</option>
                    </select>
                    <input type="hidden" name="id" th:value="${grants.id}">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">项目类别</label>
                <div class="layui-input-block">
                    <select name="category" lay-verify="required">
                        <option value="1" th:selected="${grants.category eq 1}">中央福彩公益金</option>
                        <option value="2" th:selected="${grants.category eq 2}">省级福彩公益金</option>
                        <option value="3" th:selected="${grants.category eq 3}">地市福彩公益金</option>
                        <option value="4" th:selected="${grants.category eq 4}">区县福彩公益金</option>
                        <option value="5" th:selected="${grants.category eq 5}">国家发改委计划内投资</option>
                        <option value="6" th:selected="${grants.category eq 6}">省级发改委计划内投资</option>
                        <option value="7" th:selected="${grants.category eq 7}">地市发改委计划内投资</option>
                        <option value="8" th:selected="${grants.category eq 8}">区县发改委计划内投资</option>
                        <option value="0" th:selected="${grants.category eq 0}">无</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">项目名称</label>
                <div class="layui-input-block">
                    <select name="name" lay-verify="required">
                        <option value="1" th:selected="${grants.name eq 1}">县级项目</option>
                        <option value="2" th:selected="${grants.name eq 2}">日间照料中心项目</option>
                        <option value="3" th:selected="${grants.name eq 3}">农村幸福院项目</option>
                        <option value="4" th:selected="${grants.name eq 4}">民办养老机构床位建设补贴</option>
                        <option value="5" th:selected="${grants.name eq 5}">医养结合项目</option>
                        <option value="6" th:selected="${grants.name eq 6}">农村五保供养服务设施建设项目</option>
                        <option value="7" th:selected="${grants.name eq 7}">农村五保供养机构人员薪酬和运转维护经费</option>
                        <option value="8" th:selected="${grants.name eq 8}">特困人员供养机构补助经费</option>
                        <option value="9" th:selected="${grants.name eq 9}">"以奖代补"项目</option>
                        <option value="10" th:selected="${grants.name eq 10}">其它项目</option>
                        <option value="0" th:selected="${grants.name eq 0}">无</option>
                    </select>
                </div>
            </div>

            <div class="layui-col-md4">
                <div class="layui-form-item">
                    <label class="layui-form-label must">金额</label>
                    <div class="layui-input-inline">
                        <input type="number" name="monery" th:value="${grants.monery}" oninput="if (value.length>10)value=value.slice(0,10) "  lay-verify="required" placeholder="请输入金额" autocomplete="off" class="layui-input">
                    </div>
                    <div class="layui-form-mid layui-word-aux">万元</div>
                </div>
            </div>

    <div class="layui-form-item">
        <label class="layui-form-label must">时间</label>
        <div class="layui-input-block">
            <input type="text" name="time" th:value="${#dates.format(grants.time,'yyyy-MM-dd')}"  id="time" readonly  lay-verify="required" placeholder="请选择时间" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn  layui-btn-normal" lay-submit lay-filter="submitBtn">保存</button>
            <a href="/grants" class="layui-btn layui-btn-primary">返回</a>
        </div>
    </div>
    </form>

</div>
</div>
</html>